 <nav id="navbar" class="navbar navbar-default navbar-static-top" role="navigation">
    <div class="container"> 
    
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">切换导航</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
        <h1 class="site-title"><a class="navbar-brand" href="<{:U('Index/Index/index')}>"><span class="glyphicon glyphicon-send"></span><{:R('Siteinfo/info',array('title'),'Widget')}></a></h1>
      </div>
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
          <li <if condition="($Think.get.catsid eq null) AND ($article['tid'] eq null)">class="active"</if>><a href="<{:U('Index/Index/index')}>">首页</a></li>
          <foreach name="cats" item="cats">
            <li <if condition="($Think.get.catsid eq $cats['id']) OR ($article['tid'] eq $cats['id'])">class="active"</if>><a href="<{:U('Index/List/index',array('catsid'=>$cats['id']))}>"><{$cats.name}></a></li>
          </foreach>          
        </ul>
        <form class="navbar-form navbar-left" role="search" method="post" id="searchform" action="<{:U('Index/Search/index')}>">
          <div class="form-group">
            <input type="text" class="form-control" placeholder="输入关键词搜索" name="s" id="s">
          </div>
          <button type="submit" class="btn btn-default" id="searchsubmit"><span class="glyphicon glyphicon-search"></span></button>
        </form>
        <ul class="nav navbar-nav navbar-right header-nav-right" id="user">
       
        <script>
        $(function(){
          $.get("<{:U('Index/Article/checkuser')}>",function(data) {
                $('#user').html(data);
          });
        })
        </script>

        </ul>
      </div>
    </div>
  </nav>